
// 引入请求工具函数
import request from '@/utils/request'

//登录token
export interface requestParamType {
  username: string;
  password: string;
}
export interface requestParamReturnType {
  token: string
}
export const requestLogin = (requestParam: requestParamType) => {
  return request.post<any, requestParamReturnType>("/admin/acl/index/login", requestParam)
}
//获取登录信息
export interface requestUserInfoReturnType {
  "routes": string[],
  "buttons": string[],
  "roles": string[],
  "name": string,
  "avatar": string
  
}
export const requestUserInfo = () => {
  return request.get<any, requestUserInfoReturnType>("/admin/acl/index/info")
}

//登录退出
export const requestLoginOut = () => {
  return request.post<any, null>("/admin/acl/index/logout")
}




